package com.testing.sqlUtil;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Classname PropTest
 * @Description 类型说明
 * @Date 2020/12/29 21:17
 * @Created by 特斯汀Roy
 */
public class PropTest {
    public static void main(String[] args) throws IOException {
//        Properties royp=new Properties();
//        InputStream is=Thread.currentThread().getContextClassLoader().getResourceAsStream("login.properties");
//        System.out.println(is);
//        royp.load(is);
//        //读取resources中的文件内容
////        royp.load(Properties.class.getResourceAsStream("/login.properties"));
//        System.out.println(royp.getProperty("jdbcurl"));
//        System.out.println(royp.getProperty("username"));
        String path = PropTest.class.getResource("/login.properties").getPath();
        System.out.println(path);
    }
}
